package cn.ljy.authority.model.query;


import cn.ljy.authority.model.SysUser;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 作为Admin的查询条件
 */
@ApiModel(value="账户查询条件")
@Data
public class SysUserQuery extends SysUser {
    private Integer roleId;//角色查询条件
    private Integer[] roleIds;//用于接收前端传递过来的角色集合id。说明：接收“1,3,5”这样的类型（如果是js数组可以用tostring转换为这个类型），否则spring mvc数组参数无法接受
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTimeQueryOfBegin;//注册时间——开始日期
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTimeQueryOfEnd;//注册时间——结束日期

    private Boolean accountNonLockedQuery;//因为Admin中的是继承spring security的，只能用布尔基础类型，不能用于查询搜索

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Boolean getAccountNonLockedQuery() {
        return accountNonLockedQuery;
    }

    public void setAccountNonLockedQuery(Boolean accountNonLockedQuery) {
        this.accountNonLockedQuery = accountNonLockedQuery;
    }

    public Date getCreateTimeQueryOfBegin() {
        return createTimeQueryOfBegin;
    }

    public void setCreateTimeQueryOfBegin(Date createTimeQueryOfBegin) {
        this.createTimeQueryOfBegin = createTimeQueryOfBegin;
    }

    public Date getCreateTimeQueryOfEnd() {
        return createTimeQueryOfEnd;
    }

    public void setCreateTimeQueryOfEnd(Date createTimeQueryOfEnd) {
        this.createTimeQueryOfEnd = createTimeQueryOfEnd;
    }
}
